
package tx.bj12320.model.enums;

import java.util.LinkedHashMap;

import cn.org.rapid_framework.lang.enums.EnumBase;
import cn.org.rapid_framework.lang.enums.EnumBaseUtils;

public enum DdTypeEnum implements EnumBase<String>{
	TSZB__WORK_ORDER_SOURCE(new String("TSZB__WORK_ORDER_SOURCE"),"工单来源"),
	TSZB__WORK_ORDER_SORT_TSFL(new String("TSZB__WORK_ORDER_SORT_TSFL"),"投诉分类"),
	TSZB__WORK_ORDER_SORT_JYFL(new String("TSZB__WORK_ORDER_SORT_JYFL"),"建议分类"),
	TSZB__WORK_ORDER_SORT_JBFL(new String("TSZB__WORK_ORDER_SORT_JBFL"),"举报分类"),
	TSZB__WORK_ORDER_SORT_BYFL(new String("TSZB__WORK_ORDER_SORT_BYFL"),"表扬分类"),
	TSZB__REJECT_REASON(new String("TSZB__REJECT_REASON"),"报废原因"),
	TSZB__TSWXCGZD_RESOLVE_WAY(new String("TSZB__TSWXCGZD_RESOLVE_WAY"),"投诉未形成工单解决方式"),
	TSZB__DEFINE_ALCY(new String("TSZB__DEFINE_ALCY"),"工单定义-案例采用")
	;

	private final String code;
	private final String desc;
	DdTypeEnum(String code,String desc) {
		this.code = code;
		this.desc = desc;
	}

	public String getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}

	public static DdTypeEnum getByCode(String code) {
		return EnumBaseUtils.getByCode(code, values());
	}

	public static DdTypeEnum getRequiredByCode(String code) throws IllegalArgumentException {
		return EnumBaseUtils.getRequiredByCode(code, values());
	}

	@SuppressWarnings("unchecked")
	public static LinkedHashMap<String, String> toMap() {
	    return EnumBaseUtils.toMap(values());
	}
}
